package com.siysoft.util;


public class OutTradeNo {

	public static String createTradeNo(int tradeType, int userId){

		

		//Calendar date = Calendar.getInstance();

		

		String trade_1;

		//String trade_2;

		String trade_3;

		String trade_4;

		

		trade_1 = String.valueOf(tradeType).substring(3);

		//trade_2 = String.valueOf(date.get(Calendar.YEAR)); 

		

		//trade_3 = String.valueOf(System.currentTimeMillis());

		//modified by victoryu in 2015/10/28.

		trade_3 = String.valueOf((System.currentTimeMillis())).substring(8);

		trade_4 = String.valueOf(String.valueOf(userId).hashCode()).replaceAll("-", "");

		

		StringBuffer sb = new StringBuffer();

		sb.append(trade_1);

		//sb.append(trade_2);

		sb.append(trade_4);

		sb.append(trade_3);

		

		return sb.toString();

	}

}
